package com.kust.smarthome.web.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("user")
@ApiModel("用户表")
public class User implements Serializable {

    public static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(value = "用户id", required = true)
    private Integer id;

    @TableField("username")
    @ApiModelProperty(value = "用户名 为用户邮箱", required = true)
    private String username;

    @TableField("portrait")
    @ApiModelProperty("头像路径")
    private String portrait;

    @TableField("nickname")
    @ApiModelProperty(value = "用户昵称", required = true)
    private String nickname;

    @TableField("password")
    @ApiModelProperty(value = "密码", required = true)
    private String password;

    @TableField("enabled")
    @ApiModelProperty(value = "权限 1为正常", required = true)
    private Integer enabled;

    @TableField("locked")
    @ApiModelProperty(value = "是否被锁 0 为正常", required = true)
    private Integer locked;

    @TableField("created")
    @ApiModelProperty(value = "创建时间", required = true)
    private LocalDateTime created;

    @TableField("state")
    @ApiModelProperty(value = "状态", required = true)
    private Integer state;

    @TableField("content")
    @ApiModelProperty(value = "简介")
    private String content;

    @TableField("power")
    @ApiModelProperty("权限")
    private Integer power;


}
